Skip to content

lightdm: low dependency login/display manger #875

Merged
merged 2 commits into from
Dec 11, 2018
Merged

Conversation

thomas
Copy link
Collaborator

@thomas thomas commented Aug 22, 2018

Home page:

https://github.com/CanonicalLtd/lightdm

Build and base setup is taken from:

http://linuxfromscratch.org/blfs/view/svn/x/lightdm.html

Notes:

  • lightdm must be installed to build greeters

  • gdm now means GraphicalDisplayManger

  • Final installation:

    install a greeter (slick-greeter)
    
    Tell the system to use lightdm instead of
    gdm after the next reboot
    
    #> systemctl disable gdm
    #> systemctl enable lightdm
    
  • Test w/o reboot

    #> systemctl disable gdm --now
    #> systemctl enable lightdm --now
    
    Play with the config under /etc/lightdm or not
    
    Mind the usual commands
    
    #> systemctl restart lightdm
    #> systemctl daemon-reload
    #> systemctl restart systemd-logind
    

Home page:

https://github.com/CanonicalLtd/lightdm

Build and base setup is taken from:

http://linuxfromscratch.org/blfs/view/svn/x/lightdm.html

Notes:

- lightdm must be installed to build greeters

- gdm now means GraphicalDisplayManger

- Final installation:

      install a greeter (slick-greeter)

      Tell the system to use lightdm instead of
      gdm after the next reboot

      #> systemctl disable gdm
      #> systemctl enable lightdm

- Test w/o reboot

      #> systemctl disable gdm --now
      #> systemctl enable lightdm --now

      Play with the config under /etc/lightdm or not

      Mind the usual commands

      #> systemctl restart lightdm
      #> systemctl daemon-reload
      #> systemctl restart systemd-logind
Copy link
Collaborator

@pmenzel pmenzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d put the commit from merge/pull request #876 in here too.

--sbindir=/usr/bin \
--sysconfdir=/etc \
--docdir=/usr/share/doc/lightdm-${PKGVERSION} \
--disable-static \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d prefer not specifying the default, to make the resulting configure line shorter.

lightdm-1.26.0-0/source/configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/var --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --localedir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc/lightdm --exec-prefix=/usr --prefix=/usr --libexecdir=/usr/lib/lightdm --localstatedir=/var --sbindir=/usr/bin --sysconfdir=/etc --docdir=/usr/share/doc/lightdm-1.26.0 --disable-static --disable-tests --enable-liblightdm-qt=no --with-greeter-user=gdm --with-greeter-session=slick-greeter

install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm
install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm-data
install -v -dm755 -o gdm -g gdm ${D}/var/cache/lightdm
install -v -dm770 -o gdm -g gdm ${D}/var/log/lightdm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This break building this bee file as a normal user.

[BEE] => entering mee_install_post() ..
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var’
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib’
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib/lightdm’
install: cannot change owner and permissions of ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib/lightdm’: Operation not permitted

mee_install_post() {

sed '/bin\/sh/ a \\n. /etc/profile' ${S}/tests/src/lightdm-session > ${D}/usr/bin/lightdm-session
chmod 755 ${D}/usr/bin/lightdm-session
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the default permissions?

$ ls -l /dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/usr/bin/
total 1400
-rwxr-xr-x 1 pmenzel pmenzel   54128 Aug 22 13:19 dm-tool
-rwxr-xr-x 1 pmenzel pmenzel 1370176 Aug 22 13:19 lightdm
-rw-r--r-- 1 pmenzel pmenzel     201 Aug 22 13:19 lightdm-session

Upstream bug https://github.com/CanonicalLtd/lightdm/issues/37 reported.

lightdm.be0 Outdated

[Service]
ExecStart=/usr/bin/lightdm
StandardOutput=syslog
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably copied that from the GDM service unit, but I think it’s not needed.

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 22, 2018

I tested this on keineahnung, and logging into my Xfce session, the Xfce panel is not scaled anymore (Settings → Appearance → Settings → Window scaling 2x).

@thomas
Copy link
Collaborator Author

thomas commented Aug 22, 2018

I can confirm this for thehawk, have you checked this with the xfce4_hidpi session or the default one?
From the logs I can't tell what's happening (also its not really possible to test this on a small monitor).
Can the panel height be set manually?

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 22, 2018 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 22, 2018

I used the default one. xfce4_hidpi is not needed anymore.

Then, what are the differences between xfce4_hidpi and xfce?

Could it be, that this is an issue with xfce 4.13, which is a developer release?

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 22, 2018 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 22, 2018

I've just stumbled over the nonexistant startxfce4_hidpi, I've written extra code for this case in the greeter -- Hmmmm.

Are the pool-PC's ok for scale testing? The small eizo at thehawk isn't.

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 22, 2018 via email

@thomas
Copy link
Collaborator Author

thomas commented Oct 1, 2018

I' ve checked the panel issues a little bit.
Machines where sigchld: gdm, sigusr2: lightdm.

Both failed to correctly apply 'window scaling' (Settings>Appearance>Settings>'Window scaling'), it looks like only one outof three subwidgets is scaled properly, also backswitching failes with layout errors.
So one might apply a killall -HUP xfce4-panel to get the panel back into a working state.

As for possible DBus issues, both machines allow connections to the panel, so no difference between the two setups (qdbus | grep -i panel shows the presence).

One way I found to get a neatly scaled panel is to start it under the Gtk-Debugger (GTK_DEBUG=interactive xfce4-panel), and scale the thing manually. NB this seems to apply for other parts of Xfce too, but I haven't checked it very deeply.

@thomas
Copy link
Collaborator Author

thomas commented Nov 12, 2018

Latest observations concering gdm vs. lightdm:
Testing Xfce on sigchld / sigusr2 show no difference in the awkward scaling behaviour (not all widgets do resize, missing redraws when switching back to 1x)

@thomas
Copy link
Collaborator Author

thomas commented Nov 14, 2018

Observations continued ...

Procedere: Toggle scaling 1x->2x->1x

This how the areas are named:
[app-buttons][pager][user]

  • user is the button showing the name and that provides 'logout', etc.
  • pager, obvious, the tiny windows
  • app-buttons, the things that represent the apps

Lightdm installed after dist:

  • [app-buttons] scales, rest not, layout messed up after reset to 1x

There was an interesting commit (Fix default size of new panels (Bug #14417), https://git.xfce.org/xfce/xfce4-panel/commit/?id=77e579478473d923fcf6c05a50a403f046dcea99).
Running the patched one:

  • Now [user] scales, but not the rest, layout restored after reset to 1x

Now rolling dice once more, running the latest panel from git:

  • [app-buttons] scales, rest not, layout messed up after reset to 1x, see above.

My conclusion, the panel code is still buggy, and seems to suffer from uninitialized portions.

@thomas
Copy link
Collaborator Author

thomas commented Nov 30, 2018

How to proceed...
A new tag will be introduced: 'lightdm'. Via systemds' (!) ConditionPathExists /node/tags/lightdm either gdm or lightdm will handle graphical logins. This allows testing/improving lightdm without 'fighting' against the distmaster. One subproject is lightdms promised ability of handling VNC connects, what might be pretty useful (At least IMHO:).

@wwwutz
Copy link
Collaborator

wwwutz commented Nov 30, 2018

A new tag will be introduced: 'lightdm'.
LGTM!

@donald
Copy link
Collaborator

donald commented Nov 30, 2018

Please say, when this solution (coexisting DMs with tag switch) is integrated into this pull request, so that we can test and merge it.

/etc/systemd/system/gdm.service is managed by mxtools, so !ConditionPathExists /node/tags/lightdm can (after a test) be added there. Should do no harm and should be done first.

@thomas
Copy link
Collaborator Author

thomas commented Nov 30, 2018

Will start on this next week.

@pmenzel
Copy link
Collaborator

pmenzel commented Dec 3, 2018

One subproject is lightdms promised ability of handling VNC connects, what might be pretty useful (At
least IMHO:).

By the way, GDM also supports XDMCP.

For our version 3.4.1 change /etc/gdm/custom.conf like below.

[security]
DisallowTCP=false

[xdmcp]
Enable=true

Restart GDM, and the command below works.

Xnest -query localhost -geometry 1280x1024 :1

Lightdm is enabled per host by providing the 'lightdm' tag in our
hostconfig.

Installation steps on distmaster:

 - install updated gdm.service (see mariux64/mxtools)
 - bee install lightdm-1.26.0-0.x86_64 (surprise:)
 - systemctl enable lightdm

Conditions and installation tested on sigstkflt, sigill & sigint.
@donald donald merged commit ec9dad8 into master Dec 11, 2018
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants